A Structured Presentation of a Closure-Based Compilation Method for a Scoping Notion in Logic Programming

نویسنده

  • Keehang Kwon
چکیده

We present a systematic reconstruction of a compilation method for an extension to logic programming that permits procedure de nitions to be given a scope. At a logical level, this possibility is realized by permitting implications to be embedded in goals. Program clauses that appear in the antecedents of such implications may contain variables that are bound by external quanti ers, leading to non-local variables in procedure declarations. In compiling programs in this extended language, there is, therefore, a need to consider the addition to given programs of program clauses that are parameterized by bindings for some of their variables. A proposed approach to dealing with this aspect uses a closure representation for clauses. This representation separates an instance of a clause with parameterized bindings into a skeleton part that is xed at compile-time and an environment that maintains the part that is dynamically determined. A development of this implementation scheme is provided here by starting with an abstract interpreter for the language and then re ning this to arrive at an interpreter that uses the closure representation for clauses. The abstract state machine formalism of Gurevich is used in specifying the interpreters that are of interest at the two di erent stages. We also justify this re nement by showing that the essential notion of a computation is preserved by the re nement and thus the re nement is a correct one.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Presentation and Solving Non-Linear Quad-Level Programming Problem Utilizing a Heuristic Approach Based on Taylor Theorem

The multi-level programming problems are attractive for many researchers because of their application in several areas such as economic, traffic, finance, management, transportation, information technology, engineering and so on. It has been proven that even the general bi-level programming problem is an NP-hard problem, so the multi-level problems are practical and complicated problems therefo...

متن کامل

Scoping Constructs in Logic Programming : Implementation Problems and their

This paper examines the implementation issues arising from introducing universally quantiied goals and some forms of implication goals in a logic programming language. While these constructs are useful in providing a logical approach to lexical scoping, they raise new implementation problems. Since universal and existential quantiiers may appear in mixed order in goals, the uniication operation...

متن کامل

Improving the Calculation of RPN in the FMEA Method by Combining a Nonlinear Model with Revised TOPSIS and Fuzzy Logic

Introduction: Failure Mode and Effects Analysis (FMEA) is a structured way to find and understand the states of a system’s failure and to calculate the resulting effects. In this method, which has been criticized by many researchers, the risk priority number is obtained for each failure mode based on the multiplication of the three parameters of occurrence (O), severity (S) and detection (D). I...

متن کامل

Capsules and Closures

Capsules are a clean representation of the state of a computation in higher-order programming languages with effects. Their intent is to simplify and replace the notion of closure. They naturally provide support for functional and imperative features, including recursion and mutable bindings, and ensure lexical scoping without the use of closures, heaps, stacks or combinators. We present a comp...

متن کامل

Representing Objects in a Logic Programming Language With Scoping Constructs

We present a logic programming language that uses implications and universal quantifiers in goals and in the bodies of clauses to provide a simple scoping mechanism for program clauses and constants. Within this language it is possible to define a simple notion of parametric module and local constant. Given this ability to structure programs, we explore how object-oriented programming, where ob...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • J. UCS

دوره 3  شماره 

صفحات  -

تاریخ انتشار 1997